/**
 *	@file	np_app_def.h
 *	@brief	木の実プランター アプリデファイン
 *	@author	Miyuki Iwasawa
 *	@date	08.08.04
 *
 */

#ifndef __H_NP_APP_DEF_H__
#define __H_NP_APP_DEF_H__

///アプリシーケンス定義
typedef enum{
 SEQ_FADE_IN,
 SEQ_FADE_OUT,
 SEQ_BED_SELECT,
 SEQ_LIST_COMPOST,
 SEQ_LIST_PLANT,
 SEQ_LIST_WATER,
 SEQ_LIST_HARVEST,
 SEQ_PLANT_MSG_WAIT,
 SEQ_MSG_WAIT,
 SEQ_EXIT,
};

///フレーム定義
#define UFRM_MSG	(GF_BGL_FRAME0_S)
#define UFRM_BACK	(GF_BGL_FRAME3_S)

#define DFRM_MSG	(GF_BGL_FRAME0_M)
#define DFRM_MSG2	(GF_BGL_FRAME2_M)
#define DFRM_BACK	(GF_BGL_FRAME3_M)

#define UFRM_MSG_PRI	(0)
#define UFRM_BACK_PRI	(3)
#define DFRM_MSG_PRI	(0)
#define DFRM_MSG2_PRI	(2)
#define DFRM_BACK_PRI	(3)

//////////////////////////////////////////////////////
///メッセージ関連定義

#define WORDSET_NP_BUFLEN	(16)
#define WORDSET_NP_BUFNUM	(16)
#define NP_MSG_BUFLEN		(128)	///<メッセージ展開バッファ長

typedef enum{
 MIDX_BED_SELECT,	//選んでください
 MIDX_SEED_NONE,	//きのみがない
 MIDX_COMPOST_NONE,	//肥料がない
 MIDX_WATER_KEY,	//→でいどう
 MIDX_BS_EMPTY,		//ふかふかの土だ
 MIDX_BS_COMPOST,	//肥料が蒔いてある
 MIDX_BS_GROWS01,	//うえてある
 MIDX_BS_GROWS02,	//芽がでてきた
 MIDX_BS_GROWS03,	//幹が大きくなってきた
 MIDX_BS_GROWS04,	//花が咲いた
 MIDX_BS_GROWS05,	//実ができている
 MIDX_RA_COMPOST,	//こやしをまいた
 MIDX_RA_PLANT,		//うえた
 MIDX_RA_WATER,		//よろこんでいる
 MIDX_RA_HARVEST01,	//実をとった
 MIDX_RA_HARVEST02,	//バッグにしまった
 MIDX_RA_HARVEST03,	//バッグがいっぱいだ
 MIDX_EXP_MAX,
}MSG_IDX;

typedef enum{
 BED_01,
 BED_02,
 BED_03,
 BED_04,
 BED_NULL,
}BED_ID;

///メニューリスト定義
typedef enum{
 NP_SBOX_COMPOST,
 NP_SBOX_PLANT,
 NP_SBOX_WATER,
 NP_SBOX_HARVEST,
 NP_SBOX_MAX,
}NP_SBOX_ID;

///////////////////////////////////////////
///パレット定義
#define BACK_FONT_PAL	(9)
#define MSG_FONT_PAL	(9)
//ここまでnclの中
///////////////////////////////////
#define SBOX_PAL		(11)
#define TALK_FONT_PAL	(12)
#define BMP_TALK_WIN_PAL	(13)
#define YESNO_WIN_PAL		(14)	//2本占有

#define	FCOL_W_BLACK	( GF_PRINTCOLOR_MAKE( FBMP_COL_BLACK, FBMP_COL_BLK_SDW, FBMP_COL_WHITE ) )		// フォントカラー：黒
#define	FCOL_N_BLACK	( GF_PRINTCOLOR_MAKE( 3, 2, FBMP_COL_NULL ) )		// フォントカラー：黒


///////////////////////////////////////////
//アクター関連
#define NPLANTER_ACTRES_MAX	(8)	///<リソース数
#define NPLANTER_ACTPAL_NUM	(8)	///<管理パレット数
#define ACTRES_ITEMICON	(4000)

#define ICON_ACTMAX	(10)		///<アイコンアクター同時描画最大数
#define SEED_ACTMAX	(SEEDBED_MAX)	///<木の実アクターの数
enum{
 ACT_BACK,
 ACT_CURSOR,
 ACT_POT,
 ACT_SOIL01,
 ACT_SOIL02,
 ACT_SOIL03,
 ACT_SOIL04,
 ACT_KIRA01,
 ACT_KIRA02,
 ACT_KIRA03,
 ACT_KIRA04,
 NPLANTER_ACTMAX,
};

//アクター管理数
#define NP_ACTOR_MAX	(NPLANTER_ACTMAX+SEED_ACTMAX+ICON_ACTMAX)

enum{
 ACT_SPRI_CURSOR,
 ACT_SPRI_POT,
 ACT_SPRI_EFF,
 ACT_SPRI_KIRA = (ACT_SPRI_EFF+10),
 ACT_SPRI_SEED,
 ACT_SPRI_SOIL,
 ACT_SPRI_BACK,
};

enum{
 ACTRES_NORMAL,
 ACTRES_SEED01,
 ACTRES_SEED02,
 ACTRES_SEED03,
 ACTRES_SEED04,
};

enum{
 ANM_BACK,
 ANM_BACKA,
 ANM_CUR01,
 ANM_CUR02,
 ANM_SOIL,
 ANM_BED01,
 ANM_BUD,
 ANM_KIRA,
 ANM_POT01,
 ANM_POT02,
};

enum{
 SANM_TRUNK,
 SANM_FLOWER,
 SANM_NUT,
};

typedef enum{
 BACK_BTN_ACTIVE,
 BACK_BTN_ANM,
}BACK_BTN_STATE;

#define ACT_BACK_PX	(28*8)
#define ACT_BACK_PY	(22*8)

#define ACT_CUR_PX	(3*8+3)
#define ACT_CUR_PY	(12*8)
#define ACT_CUR_OX	(27)
#define ACT_CUR_OY	(2*8)

#define ACT_SOIL_PX	(ACT_CUR_PX)
#define ACT_SOIL_PY	(ACT_CUR_PY+3)
#define ACT_SOIL_OX	(ACT_CUR_PX)

#define ACT_SEED_PX	(ACT_CUR_PX)
#define ACT_SEED_PY	(ACT_CUR_PY)
#define ACT_SEED_OX	(ACT_CUR_PX)

#define ACT_KIRA_PX	(ACT_SEED_PX)
#define ACT_KIRA_PY	(ACT_SEED_PY-8)
#define ACT_KIRA_OX	(ACT_SEED_OX)

#define ACT_ICON_PX	(ACT_SEED_PX+8)
#define ACT_ICON_PY	(ACT_SEED_PY-16)
#define ACT_ICON_OX	(ACT_SEED_OX)

#define ACT_POT_PX	(ACT_SEED_PX+4)
#define ACT_POT_PY	(ACT_SEED_PY-40)
#define ACT_POT_OX	(ACT_SEED_OX)
#define ACT_POT_SPDX	(4)

///////////////////////////////////////////
///BMPウィンドウ定義
enum{
 WIN_BACK,
 WIN_MSGS,
 WIN_MSGL,
 WIN_MAX,
};

///ウィンドウ関連キャラ領域指定(上下共用)
#define BMP_TALK_WIN_CGX	(1)

/////////////////////////////////////////////
//下画面用

//選択ボックスウィンドウ領域
#define SBOX_SEL_CT	(3)
#define SBOX_WCGX	(BMP_TALK_WIN_CGX+TALK_WIN_CGX_SIZ)
#define SBOX_W		(13)
#define SBOX_FCGX_SIZ	(SBOX_W*2*SBOX_SEL_CT)
#define SBOX_FCGX	(SBOX_WCGX+SBOX_WINCGX_SIZ)

#define SBOX_PX		(16)
#define SBOX_PY		(16)

//はい・いいえメニュー領域
#define	BMP_YESNO_PX	( 25 )
#define	BMP_YESNO_PY	( 16 )
#define BMP_YESNO_FRM	( DFRM_MSG )
#define	BMP_YESNO_PAL	( YESNO_WIN_PAL )
#define BMP_YESNO_CGX_SIZ	(TOUCH_SW_USE_CHAR_NUM)
#define	BMP_YESNO_CGX	( SBOX_FCGX+SBOX_FCGX_SIZ )

//メッセージ領域
#define	BMP_MSG_PX		( 2 )
#define	BMP_MSG_PY		( 19 )
#define	BMP_MSG_SX01	( 19 )
#define	BMP_MSG_SX02	( 27 )
#define	BMP_MSG_SY		( 4 )
#define BMP_MSG_FRM	( DFRM_MSG )
#define	BMP_MSG_PAL	( TALK_FONT_PAL )
#define BMP_MSG_CGX_SIZ	(BMP_MSG_SX02*BMP_MSG_SY)
#define	BMP_MSG_CGX01	( BMP_YESNO_CGX+BMP_YESNO_CGX_SIZ )
#define	BMP_MSG_CGX02	( BMP_MSG_CGX01+BMP_MSG_CGX_SIZ )

///やめるボタン
#define	BMP_BACK_PX	( 25 )
#define	BMP_BACK_PY	( 21 )
#define	BMP_BACK_SX	( 6 )
#define	BMP_BACK_SY	( 2 )
#define BMP_BACK_FRM	( DFRM_MSG2 )
#define	BMP_BACK_PAL	( BACK_FONT_PAL )
#define BMP_BACK_CGX_SIZ	(BMP_BACK_SX*BMP_BACK_SY)
#define	BMP_BACK_CGX	( BMP_MSG_CGX02+BMP_MSG_CGX_SIZ )

///////////////////////////////////////////
//デバッグ用

#ifdef PM_DEBUG

typedef enum{
 DMIDX_TIME01,	//
 DMIDX_TIME02,	//
 DMIDX_SEED01,	//
 DMIDX_SEED02,	//
 DMIDX_NOTHING,	//
 DMIDX_MAX,
}DEB_MSG_IDX;

enum{
 DEB_WIN_TIME,
 DEB_WIN_SEED01,
 DEB_WIN_SEED02,
 DEB_WIN_SEED03,
 DEB_WIN_SEED04,
 DEB_WIN_MAX,
};
#define	BMP_DEBT_PX	( 1 )
#define	BMP_DEBT_PY	( 1 )
#define	BMP_DEBT_SX	( 30 )
#define	BMP_DEBT_SY	( 6 )
#define BMP_DEBT_FRM	( UFRM_MSG )
#define	BMP_DEBT_PAL	( 15 /*MSG_FONT_PAL*/ )
#define BMP_DEBT_CGX_SIZ	(BMP_DEBT_SX*BMP_DEBT_SY)
#define	BMP_DEBT_CGX	( 1 )

#define	BMP_DEBS_PX	( 1 )
#define	BMP_DEBS_SX	( 30 )
#define	BMP_DEBS_SY	( 4 )
#define BMP_DEBS_FRM	( UFRM_MSG )
#define	BMP_DEBS_PAL	( 15 /*MSG_FONT_PAL*/ )
#define BMP_DEBS_CGX_SIZ	(BMP_DEBT_SX*BMP_DEBT_SY)

#define	BMP_DEBS_PY01	( 8 )
#define	BMP_DEBS_PY02	( BMP_DEBS_PY01 + BMP_DEBS_SY)
#define	BMP_DEBS_PY03	( BMP_DEBS_PY02 + BMP_DEBS_SY)
#define	BMP_DEBS_PY04	( BMP_DEBS_PY03 + BMP_DEBS_SY)
#define	BMP_DEBS_CGX01	( BMP_DEBT_CGX+BMP_DEBT_CGX_SIZ )
#define	BMP_DEBS_CGX02	( BMP_DEBS_CGX01+BMP_DEBS_CGX_SIZ )
#define	BMP_DEBS_CGX03	( BMP_DEBS_CGX02+BMP_DEBS_CGX_SIZ )
#define	BMP_DEBS_CGX04	( BMP_DEBS_CGX03+BMP_DEBS_CGX_SIZ )

#endif	//PM_DEBUG

/////////////////////////////////////////////
//タッチパネル関連
/////////////////////////////////////////////
#define TP_BACK_X	(24*8)
#define TP_BACK_Y	(20*8)
#define TP_BACK_W	(8*8)
#define TP_BACK_H	(4*8)

#define TP_SEED_X	(16)
#define TP_SEED_W	(22)
#define TP_SEED_OX	(6+TP_SEED_W)
#define TP_SEED_Y0	(11*8)
#define TP_SEED_Y1	(9*8)
#define TP_SEED_H0	(24)
#define TP_SEED_H1	(32)


#endif	//__H_NP_APP_DEF_H__

